package com.ruoyi.depot.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.ruoyi.commodity.domain.ProductImage;
import com.ruoyi.commodity.mapper.ProductImageMapper;
import com.ruoyi.depot.domain.ProcuredStorageDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.depot.mapper.LocalInventoryDetailsMapper;
import com.ruoyi.depot.domain.LocalInventoryDetails;
import com.ruoyi.depot.service.ILocalInventoryDetailsService;

/**
 * 库存变动明细Service业务层处理
 * 
 * @author luxiaoyu
 * @date 2024-12-20
 */
@Service
public class LocalInventoryDetailsServiceImpl implements ILocalInventoryDetailsService 
{
    @Autowired
    private LocalInventoryDetailsMapper localInventoryDetailsMapper;

    @Autowired
    private ProductImageMapper productImageMapper;
    /**
     * 查询库存变动明细
     * 
     * @param inventoryDetailId 库存变动明细主键
     * @return 库存变动明细
     */
    @Override
    public LocalInventoryDetails selectLocalInventoryDetailsByInventoryDetailId(Long inventoryDetailId)
    {
        return localInventoryDetailsMapper.selectLocalInventoryDetailsByInventoryDetailId(inventoryDetailId);
    }

    /**
     * 查询库存变动明细列表
     * 
     * @param localInventoryDetails 库存变动明细
     * @return 库存变动明细
     */
    @Override
    public List<LocalInventoryDetails> selectLocalInventoryDetailsList(LocalInventoryDetails localInventoryDetails)
    {
        return localInventoryDetailsMapper.selectLocalInventoryDetailsList(localInventoryDetails);
    }

    /**
     * 新增库存变动明细
     * 
     * @param localInventoryDetails 库存变动明细
     * @return 结果
     */
    @Override
    public int insertLocalInventoryDetails(LocalInventoryDetails localInventoryDetails)
    {
        return localInventoryDetailsMapper.insertLocalInventoryDetails(localInventoryDetails);
    }

    /**
     * 修改库存变动明细
     * 
     * @param localInventoryDetails 库存变动明细
     * @return 结果
     */
    @Override
    public int updateLocalInventoryDetails(LocalInventoryDetails localInventoryDetails)
    {
        return localInventoryDetailsMapper.updateLocalInventoryDetails(localInventoryDetails);
    }

    /**
     * 批量删除库存变动明细
     * 
     * @param inventoryDetailIds 需要删除的库存变动明细主键
     * @return 结果
     */
    @Override
    public int deleteLocalInventoryDetailsByInventoryDetailIds(Long[] inventoryDetailIds)
    {
        return localInventoryDetailsMapper.deleteLocalInventoryDetailsByInventoryDetailIds(inventoryDetailIds);
    }

    /**
     * 删除库存变动明细信息
     * 
     * @param inventoryDetailId 库存变动明细主键
     * @return 结果
     */
    @Override
    public int deleteLocalInventoryDetailsByInventoryDetailId(Long inventoryDetailId)
    {
        return localInventoryDetailsMapper.deleteLocalInventoryDetailsByInventoryDetailId(inventoryDetailId);
    }
}
